public class Test {
    public static void main(String[] args) {
        double pi = 0.0;
        double i = 1;
        long   j = 100000000L;
        double flg = 1;
        while (j-- > 0L) {
            pi += (4.0/i) * flg;
            i += 2;
            flg = flg * -1;
        }
        System.out.println(pi);
    }
}
